UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RMVQ/EuUg5Exx0/tCl99YaQDQOFeuqrgTTKLWRKwjGQ=' 
WHERE 
  key_id = 'a99f7149aa5c3d6d7dff7972856ef665bbac8a43805dab22f272477e2f2d0e6c' 
  AND (
    token = 'RMVQ/EuUg5Exx0/tCl99YaQDQOFeuqrgTTKLWRKwjGQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00080