UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qVbE6uMbGSbcgABqvMTG1zT3tFU+TKt5u6vi83LxSR0='
WHERE
key_id = '4484076fe962ffcc6f0d072f82383fbc1a9f8cdae12d5add40c1ca4b8b428c1d'
AND (
token = 'qVbE6uMbGSbcgABqvMTG1zT3tFU+TKt5u6vi83LxSR0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)