UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'a0adbAo6hD/ltn3KYwN66qONP9NyxhlE7M9ZH7diTWU=' 
WHERE 
  key_id = '3185d292feedc8f8c7be9f0cea48f4796cdc78d57299ee9e8efc624bd08ca6cb' 
  AND (
    token = 'a0adbAo6hD/ltn3KYwN66qONP9NyxhlE7M9ZH7diTWU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00063