UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wtPxtMp7aySKUaRTXL8bYQpnvYalPI9ES51ROWtN7K4='
WHERE
key_id = '0efaa3b33af99e3395b6fdc63e36072ecc9c8715a20fcf99f558c0b0158c6c91'
AND (
token = 'wtPxtMp7aySKUaRTXL8bYQpnvYalPI9ES51ROWtN7K4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)