UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '95Uv8qoIP79L62AJ7hQoZgKHlF+ZJE+0HZXAaBjtG3g='
WHERE
key_id = '8bdaec67bda55904be8619bae0ef98702895761b3c439e198c716c56ed82db5f'
AND (
token = '95Uv8qoIP79L62AJ7hQoZgKHlF+ZJE+0HZXAaBjtG3g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)