UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RJfzY8gx9NtQrNb9NisnO4ET2kRty6GDbw09YZKbnvg=' 
WHERE 
  key_id = 'a155fcf84f2036c075df04ab04784eede3741c2c89cb68635347f3275c43cf81' 
  AND (
    token = 'RJfzY8gx9NtQrNb9NisnO4ET2kRty6GDbw09YZKbnvg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042