UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tblEITUq1js4VwbJmNjNyGX9goBpMDJvnpCbDn2YzFk='
WHERE
key_id = 'bad20911edfe613e5dcc26a325dfd27cc58b32991b26ce45f716078f7d6a1600'
AND (
token = 'tblEITUq1js4VwbJmNjNyGX9goBpMDJvnpCbDn2YzFk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)