UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VJ9pCIuM48Usrjkh4VTa1l6CxMMVZzeruKfh6e+5fKc='
WHERE
key_id = '606cef6e4001b7f8af7db857b13471250b4df183d6c3349b3e9db76ccd1a2a84'
AND (
token = 'VJ9pCIuM48Usrjkh4VTa1l6CxMMVZzeruKfh6e+5fKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)