UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FfI960IO0LVUdfef2PR4YMcLeXOheHBMN0sfHmVjz68='
WHERE
key_id = '282ad6b5e26bce0f7989d23dc4f5d9482b62aa7e4b1ef39d082ba3a67506e9b1'
AND (
token = 'FfI960IO0LVUdfef2PR4YMcLeXOheHBMN0sfHmVjz68='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)