UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VGa2sYHKWJzyLMgVJvzhKRu8rPgGhY9NFfQ/vPmuX0Q='
WHERE
key_id = '7ca3f2d9e05df9b272927df8e4c32ac4591a7bcdc6afcbff7ff199cdc3c6487c'
AND (
token = 'VGa2sYHKWJzyLMgVJvzhKRu8rPgGhY9NFfQ/vPmuX0Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)