UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q/XLJq0ejlibDV2MfYofBV7vW0TexpCHyzuqeA2FN94='
WHERE
key_id = '44fdc5e47c2fe779d8b9a9d2479828771a01cd8bda6b0ee09a5bfdb1dcad965c'
AND (
token = 'q/XLJq0ejlibDV2MfYofBV7vW0TexpCHyzuqeA2FN94='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)