UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZJt4uM9Auj5/G1qRnvhvdrAIX6WMZLWaT38Uj19MDmY=' 
WHERE 
  key_id = '360fd3b42f1d2724141c3cec7705970fda308bedded703a424eaa09b3e08a520' 
  AND (
    token = 'ZJt4uM9Auj5/G1qRnvhvdrAIX6WMZLWaT38Uj19MDmY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061