UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0rUjdMpicoEyG1ZDgrwhepHVyn4oVhMJhnLCvbJoJ2M=' 
WHERE 
  key_id = 'cf0df0cbbb78a065a0a63aa9cdae21f1ecbf028eb2e0c3ddd1b35290272e5511' 
  AND (
    token = '0rUjdMpicoEyG1ZDgrwhepHVyn4oVhMJhnLCvbJoJ2M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034