UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kPKtlNdSwnR/0NmXxgDHo+evaeCZ/EijlO2TDetFefA='
WHERE
key_id = '353f1b54bdb968ede326d03f233777583218afec1fb7d278e3cdd7aaec97d035'
AND (
token = 'kPKtlNdSwnR/0NmXxgDHo+evaeCZ/EijlO2TDetFefA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)