UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hwpv8aqZmZSASz4XC1QDG7mNCtuD/TleK570UZjWvbM=' 
WHERE 
  key_id = 'acdb84df115b88b8b10e05ec04f1a14be1baeef9949b9a367e3e40323103fb64' 
  AND (
    token = 'hwpv8aqZmZSASz4XC1QDG7mNCtuD/TleK570UZjWvbM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035