UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '63mR0xacbNFxFxvW4ZlyVpYIUpfbUx65W4UREx2cumk='
WHERE
key_id = 'd66be28aa871d7c7b63bb640a5f4832d8145f78422cb51c23e235181aa681f61'
AND (
token = '63mR0xacbNFxFxvW4ZlyVpYIUpfbUx65W4UREx2cumk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)