UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QKbwGAax+T52k+vvyQCoc2GVojQ9QYseTKA7GTm5O2s=' 
WHERE 
  key_id = '94b941bfd76e57764684d3fdbdc0d1204ff9155d4d0700ea56ed25af0b026a30' 
  AND (
    token = 'QKbwGAax+T52k+vvyQCoc2GVojQ9QYseTKA7GTm5O2s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030