UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SJlgLlLzu/rEfsSbSkGFCxoSLboz9ko5TacBOf6fqbg='
WHERE
key_id = '712590f66d5f02857e587ab4375f6ef69a5f3771631bcdb280cfe1d8fde15624'
AND (
token = 'SJlgLlLzu/rEfsSbSkGFCxoSLboz9ko5TacBOf6fqbg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)