UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7r6PVvItF7DWDKS7rzPQVaJtmeY7GF4JohnL15j/13Y='
WHERE
key_id = '4e533845426e27734352064f148a3102ba3d8c0cdff93ae08050bada4ced38f4'
AND (
token = '7r6PVvItF7DWDKS7rzPQVaJtmeY7GF4JohnL15j/13Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)