UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fxW90x0hSaK+Fst9SNfWfF82gxmiw+mU8Ql9TBWmslk=' 
WHERE 
  key_id = '4fc11c3b52b15ee5a0e3644d574750ad6b32a77385e8d75db804df11607c01ae' 
  AND (
    token = 'fxW90x0hSaK+Fst9SNfWfF82gxmiw+mU8Ql9TBWmslk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016