UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u+W2yIWHLWXIvZ67xz24cXtyn8Wmif8yqFmAud4/zHk='
WHERE
key_id = '4969ed259f68ecebcc7b93728b490825c9b14c3a50d73160f0401ae5c04a1f16'
AND (
token = 'u+W2yIWHLWXIvZ67xz24cXtyn8Wmif8yqFmAud4/zHk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)