UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eps0n5wL5UUBW7RqTMxs9qEfos5YX2jlQtftPqBJoQ4=' 
WHERE 
  key_id = '64e4430ef779fb58c7ca20a0793996e364190b1be6cac587e55991b20c629334' 
  AND (
    token = 'eps0n5wL5UUBW7RqTMxs9qEfos5YX2jlQtftPqBJoQ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030