UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+plNkJp67NnF8AKySxNkjRYR/Plr8+vg7kRmxAzD2Sc='
WHERE
key_id = '71baa92cb38a9d7e5c60172653d6b7ffd32848d8aa4d30964660ecf3906c4cfc'
AND (
token = '+plNkJp67NnF8AKySxNkjRYR/Plr8+vg7kRmxAzD2Sc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)