UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zZWVQLoUwkx3+j4WFZUKvkBcTpApog1m+Z8cJ+GLMKY='
WHERE
key_id = '73feca6d7c3a1cf6ad62fd738edce47c65caea420fbbd0690a4b8d962a79af1c'
AND (
token = 'zZWVQLoUwkx3+j4WFZUKvkBcTpApog1m+Z8cJ+GLMKY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)