UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VfXY3tPIviFqsdbp0v/wwPh/ejhuic8UMyMHPKh2LpQ='
WHERE
key_id = '95b9a0293ef226e6353d548d73b2b18c691daa3cfc2171c59f0e20651460a926'
AND (
token = 'VfXY3tPIviFqsdbp0v/wwPh/ejhuic8UMyMHPKh2LpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)