UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MkYea63NAQ4X3pfupZAOmYfJO/KrCs/EOxMBHugIZ7c=' 
WHERE 
  key_id = '96d20648331f313bc70f5214b8c93bbc03edce63119ebf7794933b4e2c2fce63' 
  AND (
    token = 'MkYea63NAQ4X3pfupZAOmYfJO/KrCs/EOxMBHugIZ7c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033