UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sCTLWICMatZWFsOVqkCqMzSbVMt1wXWRZDyljYo8aLw=' 
WHERE 
  key_id = '72ecc9481eb63b76cd9d2878a31c8b6a4b996d0646ef51e48167aae0c175ad72' 
  AND (
    token = 'sCTLWICMatZWFsOVqkCqMzSbVMt1wXWRZDyljYo8aLw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018