UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HwB8/UlyWulUB0TVW4cROV2WXeqL8BYvqGHbKzwJYEg='
WHERE
key_id = '919fa665a5e4fe3fc9a833237fe11750e82c75d8c98db62d1a00a17bf5337345'
AND (
token = 'HwB8/UlyWulUB0TVW4cROV2WXeqL8BYvqGHbKzwJYEg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)