UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j1l3qEXZ0Mk2NknNAHQIA0GkpcxFPwFd2Yy+lxXURFg='
WHERE
key_id = '150218e753b5b2a9b5e8ada5732f19c9c6049f849d0b8b29c71f4107b4cb3ade'
AND (
token = 'j1l3qEXZ0Mk2NknNAHQIA0GkpcxFPwFd2Yy+lxXURFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)