UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DksdVkqa/qz2EHpD1naWqplndC9aUdkvGR8P8VcthuA='
WHERE
key_id = '2e1de1df3d19648f0162a46661f791b3efd27f4950f1ba3523bd84fb4981a050'
AND (
token = 'DksdVkqa/qz2EHpD1naWqplndC9aUdkvGR8P8VcthuA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)