UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Qwc5jlD4QXfJCoV4/JW161L//uTizrvosQgQ8iwIif8=' 
WHERE 
  key_id = '048d33add721e0169226928d8f8a6a5c74359b4733e394020a4d104436d870b2' 
  AND (
    token = 'Qwc5jlD4QXfJCoV4/JW161L//uTizrvosQgQ8iwIif8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055