UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'a3qAYybqrbeWh3gr1dPPfJyrXNrm9pCK3AAPXG5siQQ='
WHERE
key_id = '7292be6298034c2c8bdc96a23d35b2c6a60d7fe871c3ff4a5d8270d8d95f845e'
AND (
token = 'a3qAYybqrbeWh3gr1dPPfJyrXNrm9pCK3AAPXG5siQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)