UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eBjS35RqxMy0OA6gdPntyEQWqyelhVnvtCiGF4d/80A=' 
WHERE 
  key_id = '455b17967d39e4ce3902c0030911626234fa1b0c71430826006e8e99606a1247' 
  AND (
    token = 'eBjS35RqxMy0OA6gdPntyEQWqyelhVnvtCiGF4d/80A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041