UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lIKQnUArUOYc2eK7/GBEmBxTNx7A4MbJ0hg05XYuHJ4='
WHERE
key_id = 'c1c85d010ca7388356eaeec158de15ff82302c5425b7e8fe97c9e6562042bcab'
AND (
token = 'lIKQnUArUOYc2eK7/GBEmBxTNx7A4MbJ0hg05XYuHJ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)