UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4+3VaxMoMI+nR/aUJLHToBhU9vEA5P5sRmolbh75zKA='
WHERE
key_id = '43d57b6e42e721f1bc0ba1a93b665a2ed9cdd22cb85d3c20e2529faf95cd7668'
AND (
token = '4+3VaxMoMI+nR/aUJLHToBhU9vEA5P5sRmolbh75zKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)