UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ef1dqrQUQOvKt1Y2LlVz+4SPnlws+Q/GLS673LUXDKM=' 
WHERE 
  key_id = 'dced8e9efc2db99dafe8a6b0ccbfcc887dbfb9332deb6fc8dc472f2c5f4f4659' 
  AND (
    token = 'Ef1dqrQUQOvKt1Y2LlVz+4SPnlws+Q/GLS673LUXDKM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033