UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wpnDNs3JRMNR6Ju46ShXK0/NSez66Le0O+9+cR/yxfo='
WHERE
key_id = 'ae275c2e667a1b0f89791cd8d62e998575917506f84d5323b7bf2bee8633072f'
AND (
token = 'wpnDNs3JRMNR6Ju46ShXK0/NSez66Le0O+9+cR/yxfo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)