UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm+x35nB5W/r5BOVb0jQXeWPT2KjIh2Oqb7cQK44TSIE='
WHERE
key_id = '967e94af3af6f144c6fa36fe6f5dca43cf5e451e3d8665d129d77a5694cbe88f'
AND (
token = 'm+x35nB5W/r5BOVb0jQXeWPT2KjIh2Oqb7cQK44TSIE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)