UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TRJ6Zmtxk5gVByGcpiV1y1I4SMYK1mqo6I5ueGJRnDw=' 
WHERE 
  key_id = '91972b0bddf0a72e7d8b2c0d7412fd4fe72e2e03b5ba8bacea976ce25cab69c4' 
  AND (
    token = 'TRJ6Zmtxk5gVByGcpiV1y1I4SMYK1mqo6I5ueGJRnDw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043