UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oMP48/kDSiv307xhBiLDY29RSrrlF8YGqdKF4kto32s='
WHERE
key_id = '602571f9644042cf545a945c77660162201c6692c7a4b1a8c5ab7b796c889dd8'
AND (
token = 'oMP48/kDSiv307xhBiLDY29RSrrlF8YGqdKF4kto32s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)