UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jAV8V2ymAXzQxQGNUD3gLvhB4DQIV5BG8PgxG/gy+no=' 
WHERE 
  key_id = 'dc0e5952d62586b83e5445c0be308739866a05b453f6857921374b0002ade5d5' 
  AND (
    token = 'jAV8V2ymAXzQxQGNUD3gLvhB4DQIV5BG8PgxG/gy+no=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033