UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GUcJ+XbrDGBqiVdAa+8UUfCtxispdZybG/2sBJPCTbA=' 
WHERE 
  key_id = '892cfb1ae06ba34de8ed6e0badb2672363d96b25bb62dbe3fa7d146dd9f00c39' 
  AND (
    token = 'GUcJ+XbrDGBqiVdAa+8UUfCtxispdZybG/2sBJPCTbA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026