UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UaUQsi/UVfr3jONS44ah/stO8zu+XZfY+Vhn7cP5HWA='
WHERE
key_id = '7b13e30b2c5d1fcac0e8fea37bc3ac69eb31298f64041129b2131fbbbb6f6e69'
AND (
token = 'UaUQsi/UVfr3jONS44ah/stO8zu+XZfY+Vhn7cP5HWA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)