UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G92prVr0MoHymbQnzRB6vXlYEv1Nj0RoFWXKNx5Z348=' 
WHERE 
  key_id = '123bfdd73f2f2b953b39e0fc1e3024ab5dc1baddfa91d8d10cff7ab05493273d' 
  AND (
    token = 'G92prVr0MoHymbQnzRB6vXlYEv1Nj0RoFWXKNx5Z348=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034