UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DRnTLEAsxHF1VhreQu6VrArkvXoyxSlctv7Acjn0bqU=' 
WHERE 
  key_id = '88f2b1eb22bd05e9523d22a0652673a2d327820122eb9fb71830e5f168c99981' 
  AND (
    token = 'DRnTLEAsxHF1VhreQu6VrArkvXoyxSlctv7Acjn0bqU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021