UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pxPXjkIYGXUYRCsFa9JBVMyWp8cd/0m/8m5YsKlnG9w=' 
WHERE 
  key_id = '011d75151ce492adb5b030d5a7c53e4bca5cc2a0c9c68253bfa03d8b78d7a1b5' 
  AND (
    token = 'pxPXjkIYGXUYRCsFa9JBVMyWp8cd/0m/8m5YsKlnG9w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032