UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kRVeHta5R8M9Vj06W9Nc6KtXdA2nOU+XGvEZ4b8AAqA='
WHERE
key_id = '6795e65c7f65f7c924e59a20db02f158fa05ef9a7d59baf5dbf4ee2b674c1f26'
AND (
token = 'kRVeHta5R8M9Vj06W9Nc6KtXdA2nOU+XGvEZ4b8AAqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)