UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RPNyFVqebcpeixMnJEJfHL/ZSy7n2eUQYLGSKDar1C8='
WHERE
key_id = '36dab6bfe5f4a0f9777587fe66e4b9787a8863d73c833b056100ecf5029ed2eb'
AND (
token = 'RPNyFVqebcpeixMnJEJfHL/ZSy7n2eUQYLGSKDar1C8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)